package club.yuyang.mybatisplus.demo.controller;

import club.yuyang.mybatisplus.demo.mapper.UserMapper;
import club.yuyang.mybatisplus.demo.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author yuyang
 * @date 2020/5/12 19:01
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserMapper userMapper;

    @GetMapping("")
    public List<User> list(){
        return userMapper.selectList(null);
    }
}
